<template>
  <view class="bg-white">
    <view v-html="content"></view>
  </view>
</template>
<script>
// import { agreement } from '@/api/home'
export default {
  data() {
    return {
      type: 1,
      content: '',
    }
  },
  onLoad(e) {
    if (e.type) {
      this.type = e.type
    }
    let title = ''
    if (this.type == 1) {
      title = '注册协议'
    } else {
      title = '隐私政策'
    }
    uni.setNavigationBarTitle({
      title: title,
    })
    // this.getdetail()
  },
  methods: {
    getdetail() {
      // 1注册协议 7隐私协议
      agreement(this.type).then((res) => {
        console.log(res, 'res')
        this.content = res.data.content
      })
    },
  },
}
</script>
<style lang="scss">
.bg-white {
  padding: 0 30rpx;
  font-size: 26rpx;
  line-height: 40rpx;
  color: #333;
  text-align: justify;
}
</style>
